<%@ page import="java.sql.*" %>
<html>

<body bgcolor="#fdfec5">
<center><img src="images/7.jpeg" border=0 width=263 height=128>
<br><br><br>
<center><font color="#1589FF" size="5"><b><i><u>Balance Details Of Customer</u></i></b></font></center><br><br>
<%
try
{
//String a=request.getParameter("n");
//String b=request.getParameter("am");
String c=null;
String d=session.getAttribute("pin").toString();
//System.out.println(a+b+c+d);
  Class.forName("oracle.jdbc.driver.OracleDriver");
   Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","bank","bank");
  Statement st=con.createStatement();
 ResultSet rs=st.executeQuery("select  address from customer where accno="+d);
 %>
 <center>
 
	
	 	
	 <%
		 	if(rs.next())
	    	  {
		c=rs.getString(1);
		}
		System.out.println("sucess");
		PreparedStatement ps=con.prepareStatement("insert into requestcheck values(?,?)");
		
		ps.setString(1,d);
			ps.setString(2,c);
		//ps.setString(3,c);
		//ps.setString(4,b);
		ps.execute();

		//st.executeUpdate("update accountdetails set amount=amount+"+b+" where accno='"+a+"'");
		//st.executeUpdate("update accountdetails set amount=amount-"+b+" where accno='"+d+"'");
		//response.sendRedirect("Index.html");
		%>
		Request sended
		<br><a href="Index.html">Home</a>
				<%
    st.close();
    rs.close();
    con.close(); 
    %>
   
    <%}
   		catch(Exception e)
	{
	e.printStackTrace();
	}
%>
